// 路由配置
const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("@/pages/login/Index.vue"),
    meta: {
      title: "登录",
      transition: "animate__fadeOut",
    },
  },
  {
    path: "/",
    name: "layout",
    component: () => import("@/components/Layout.vue"),
    //重定向
    redirect: "/login",
    meta: {
      title: "布局",
      transition: "animate__fadeInTopLeft",
    },
    children: [
      {
        path: "machine",
        name: "machine",
        component: () => import("@/pages/machine/Index.vue"),
        meta: {
          title: "机器管理",
          transition: "animate__fadeOut",
        },
      },
      {
        path: "monitor",
        name: "monitor",
        component: () => import("@/pages/monitor/Index.vue"),
        meta: {
          title: "监测管理",
          transition: "animate__fadeOut",
        },
      },
      {
        path: "assess",
        name: "assess",
        component: () => import("@/pages/assess/Index.vue"),
        meta: {
          title: "预警评估",
          transition: "animate__fadeOut",
        },
      },
      {
        path: "notice",
        name: "notice",
        component: () => import("@/pages/notice/all/Index.vue"),
        meta: {
          title: "消息数据",
          transition: "animate__fadeOut",
        },
      },
      {
        path: "about",
        name: "about",
        component: () => import("@/pages/about/Index.vue"),
        meta: {
          title: "个人中心",
          transition: "animate__fadeOut",
        },
      },
      {
        path: "smart",
        name: "smart",
        component: () => import("@/pages/smart/Index.vue"),
        meta: {
          title: "智能导航",
          transition: "animate__fadeOut",
        },
      },
      {
        path: "cloud",
        name: "cloud",
        component: () => import("@/pages/cloud/Index.vue"),
        meta: {
          title: "云端连接",
          transition: "animate__fadeOut",
        },
      },
    ],
  },
  {
    path: "/:pathMatch(.*)*",
    name: "NotFound",
    component: () => import("@/pages/404/Index.vue"),
  },
];

export default routes;
